package com.zyb.org.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.zyb.basic.domain.BaseDomain;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data//包括setter getter toString constructor方法
public class Department extends BaseDomain {
    private String sn;
    private String name;
    private String dirPath;
    private Integer state;
    private Long manager_id;
    private Long parent_id;
    private Long shop_id;
    /*关联部门经理*/
    private Employee manager;
    /*上级部门*/
    private Department parent;
    /*用来装子部门*/
    @JsonInclude(JsonInclude.Include.NON_EMPTY)//如果集合为空 就不用转json
    private List<Department> children = new ArrayList<>();
}
